package com.ruoyi.work.service.impl;

import java.util.List;

import com.ruoyi.work.domain.PdWorkList;
import com.ruoyi.work.mapper.PdWorkListMapper;
import com.ruoyi.work.service.IPdWorkListService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 派单Service业务层处理
 *
 * @author wkw
 * @date 2024-07-19
 */
@Service
public class PdWorkListServiceImpl implements IPdWorkListService
{
    @Autowired
    private PdWorkListMapper pdWorkListMapper;

    /**
     * 查询派单
     *
     * @param id 派单主键
     * @return 派单
     */
    @Override
    public PdWorkList selectPdWorkListById(Long id)
    {
        return pdWorkListMapper.selectPdWorkListById(id);
    }

    /**
     * 查询派单列表
     *
     * @param pdWorkList 派单
     * @return 派单
     */
    @Override
    public List<PdWorkList> selectPdWorkListList(PdWorkList pdWorkList)
    {
        return pdWorkListMapper.selectPdWorkListList(pdWorkList);
    }

    /**
     * 新增派单
     *
     * @param pdWorkList 派单
     * @return 结果
     */
    @Override
    public int insertPdWorkList(PdWorkList pdWorkList)
    {
        pdWorkList.setDelFlag("0");
        return pdWorkListMapper.insertPdWorkList(pdWorkList);
    }

    /**
     * 修改派单
     *
     * @param pdWorkList 派单
     * @return 结果
     */
    @Override
    public int updatePdWorkList(PdWorkList pdWorkList)
    {
        return pdWorkListMapper.updatePdWorkList(pdWorkList);
    }

    /**
     * 批量删除派单
     *
     * @param ids 需要删除的派单主键
     * @return 结果
     */
    @Override
    public int deletePdWorkListByIds(Long[] ids)
    {
        return pdWorkListMapper.deletePdWorkListByIds(ids);
    }

    /**
     * 删除派单信息
     *
     * @param id 派单主键
     * @return 结果
     */
    @Override
    public int deletePdWorkListById(Long id)
    {
        return pdWorkListMapper.deletePdWorkListById(id);
    }
}
